Method and device for processing video, and storage medium

ABSTRACT

A method, apparatus, and a non-transitory computer-readable storage medium for processing a video are provided. A terminal determines a subject region of a video frame in a video and a background region. A target object is located in the subject region. The background region is a region of the video frame other than the subject region. The terminal overlays the subject region in at least one of a first video frame having the target object on at least one of a second video frame having the target object and generates a special effect frame including at least two subject regions in each of which the target object is located.

CROSS-REFERENCE TO RELATED APPLICATION

This application is based on, and claims benefit of priority to, ChineseApplication No. 202010737025.5 filed on Jul. 28, 2020. Disclosure of theChinese Application is hereby incorporated by reference in its entirety.

TECHNICAL FIELD

The present disclosure relates to multimedia technology. Morespecifically, this application relates to video processing.

BACKGROUND

With the continuous development of multimedia technology, video specialeffects are often used in film and television works to display rich andcolorful and even surrealistic video effects such as a time staticspecial effect, a doppelgänger (or clone, or copy) special effect, etc.However, implementation of a special effect of a video requiresprofessional post-processing, and massive amount of edition andproduction using post-production tools, which makes it difficult topromote and apply the special effect technology. In this way, it is alsodifficult to preview the special effect directly in the videophotographing process. In addition, the production of the video specialeffect is difficult, the learning cost is high, and therefore, a highprofessional requirement is also required for the post-productionpersonnel.

SUMMARY

The present disclosure may relate to multimedia technologies. Thepresent disclosure provides a method and device for processing a video,and a storage medium.

According to a first aspect of the present disclosure, there is provideda method for processing a video. The method may include a terminaldetermining a subject region of a video frame in a video and abackground region. A target object may be located in the subject region.The background region may be a region of the video frame other than thesubject region. The terminal may further overlay the subject region inat least one of a first video frame having the target object on at leastone of a second video frame having the target object and generate aspecial effect frame including at least two subject regions in each ofwhich the target object is located.

According to second aspect of the present disclosure, a device isprovided. The device may include one or more processors and anon-transitory computer-readable storage medium for storing executableinstructions executable on the one or more processors. The one or moreprocessors may be configured to determine a subject region of a videoframe in a video and a background region. A target object may be locatedin the subject region. The background region may be a region of thevideo frame other than the subject region. The one or more processorsmay be further configured to overlay the subject region in at least oneof a first video frame having the target object on at least one of asecond video frame having the target object. The one or more processorsmay be further configured to generate a special effect frame includingat least two subject regions in each of which the target object islocated.

According to a third aspect of the present disclosure, a non-transitorycomputer-readable storage medium having stored therein instructions isprovided. When the instructions are executed by one or more processorsof the apparatus, the instructions may cause the apparatus to determinea subject region of a video frame in a video and a background region. Atarget object may be located in the subject region. The backgroundregion may be a region of the video frame other than the subject region.The instructions may also cause the apparatus to overlay the subjectregion in at least one of a first video frame having the target objecton at least one of a second video frame having the target object. Theinstructions may also cause the apparatus to generate a special effectframe including at least two subject regions in each of which the targetobject is located.

It should be understood that the general description above and theelaboration below are illustrative and explanatory only, and do notlimit the present disclosure.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute apart of this specification, illustrate embodiments consistent with thepresent disclosure and, together with the description, serve to explainthe principles of the present disclosure.

FIG. 1 is a flowchart illustrating a method for processing a video,according to an example of the present disclosure.

FIG. 2 is a flowchart illustrating a method for processing a video,according to an example of the present disclosure.

FIG. 3 is a flowchart illustrating a method for processing a video,according to an example of the present disclosure.

FIG. 4 is a flowchart illustrating recording a video with a frozendoppelgänger special effect, according to an example of the presentdisclosure.

FIG. 5 is a flowchart illustrating recording a video with a frozendoppelgänger special effect, according to an example of the presentdisclosure.

FIG. 6A is a schematic diagram illustrating a frozen doppelgängerspecial effect, according to an example of the present disclosure.

FIG. 6B is a schematic diagram illustrating a frozen doppelgängerspecial effect, according to an example of the present disclosure.

FIG. 7 is a block diagram illustrating a structure of a device forprocessing a video, according to an example of the present disclosure.

FIG. 8 is a block diagram illustrating a physical structure of aterminal, according to an example of the present disclosure.

DETAILED DESCRIPTION

Reference will now be made in detail to illustrative embodiments,examples of which are illustrated in the accompanying drawings. Thefollowing description refers to the accompanying drawings in which thesame numbers in different drawings represent the same or similarelements unless otherwise represented. The implementations set forth inthe following description of illustrative embodiments do not representall implementations consistent with the present disclosure. Instead,they are merely examples of devices and methods consistent with aspectsrelated to the present disclosure as recited in the appended claims. Theillustrative implementation modes may take on multiple forms, and shouldnot be taken as being limited to examples illustrated herein. Instead,by providing such implementation modes, embodiments herein may becomemore comprehensive and complete, and comprehensive concept of theillustrative implementation modes may be delivered to those skilled inthe art. Implementations set forth in the following illustrativeembodiments do not represent all implementations in accordance with thesubject disclosure. Rather, they are merely examples of the apparatusand method in accordance with certain aspects herein as recited in theaccompanying claims.

Note that although a term such as first, second, third may be adopted inan embodiment herein to describe various kinds of information, suchinformation should not be limited to such a term. Such a term is merelyfor distinguishing information of the same type. For example, withoutdeparting from the scope of the embodiments herein, the firstinformation may also be referred to as the second information.Similarly, the second information may also be referred to as the firstinformation. Depending on the context, a “if” as used herein may beinterpreted as “when” or “while” or “in response to determining that”.

In addition, described characteristics, structures or features may becombined in one or more implementation modes in any proper manner. Inthe following descriptions, many details are provided to allow a fullunderstanding of embodiments herein. However, those skilled in the artwill know that the embodiments herein may be carried out without one ormore of the details; alternatively, another method, component, device,option, etc., may be adopted. Under other conditions, no detail of aknown structure, method, device, implementation, material or operationmay be shown or described to avoid obscuring aspects of embodimentsherein.

A block diagram shown in the accompanying drawings may be a functionalentity which may not necessarily correspond to a physically or logicallyindependent entity. Such a functional entity may be implemented in formof software, in one or more hardware modules or integrated circuits, orin different networks and/or processor devices and/or microcontrollerdevices.

A terminal may sometimes be referred to as a smart terminal. Theterminal may be a mobile terminal. The terminal may also be referred toas User Equipment (UE), a Mobile Station (MS), etc. A terminal may beequipment or a chip provided therein that provides a user with a voiceand/or data connection, such as handheld equipment, onboard equipment,etc., with a wireless connection function. Examples of a terminal mayinclude a mobile phone, a tablet computer, a notebook computer, a palmcomputer, a Mobile Internet Device (MID), wearable equipment, VirtualReality (VR) equipment, Augmented Reality (AR) equipment, a wirelessterminal in industrial control, a wireless terminal in unmanned drive, awireless terminal in remote surgery, a wireless terminal in a smartgrid, a wireless terminal in transportation safety, a wireless terminalin smart city, a wireless terminal in smart home, etc.

FIG. 1 is a flowchart of a method for processing a video according to anillustrative embodiment. As shown in FIG. 1 , the method is applied to aterminal, and includes steps as follows.

In S101, a subject region of a video frame in a video, in which a targetobject is located, and a background region, are determined. Thebackground region is a region of the video frame other than the subjectregion.

In S102, the subject region in at least one of a first video framehaving the target object is overlaid on at least one of a second videoframe having the target object, generating a special effect frameincluding at least two subject regions in each of which the targetobject is located.

In embodiments of the present disclosure, the terminal is electronicequipment having a display function. A user may play a video or previewvideo content during recording of the video through the terminal.

The video to be processed may be a recorded video file or a video beingrecorded. The process of video recording includes a process of acquiringa plurality of consecutive video frames. A recorded video part is formedof the video frames.

In embodiments of the present disclosure, the target object may beidentified in a video frame in a target identification manner. Thetarget object may be the subject part of focus in a picture, including asubject that may move in the video, such as a movable object such as aperson, an animal, an automobile, an airplane, etc., in the picture.

By picture segmentation, the subject region in which the target objectis located may be isolated from the image of a video frame. Byoverlaying the subject region in which the target object is located onanother video frame, a doppelgänger effect of displaying at least twosubject regions in a video picture may be implemented.

The first video frame serves as a video frame providing a segmentsubject region of the target object, and the second video frame servesas a video frame on which the segment subject region overlays. Whileproviding a segment subject region, a first video frame may also serveas a second video frame on which the subject region of another firstvideo frame overlays. For example, the subject region in the first frameis isolated and overlaid on the second frame and each following videoframe, and the subject region in the 100th frame is isolated andoverlaid on the 101st frame and each following video frame. Then, thesecond frame and each following video frame each serve as a second videoframe, and the 100th frame serves both as a first video frame and asecond video frame.

For example, in the video, the subject person walks from the left end ofthe picture to the right end of the picture. In video processing, apicture in which the subject person is located at the left end issegmented to acquire the subject region. The segment subject regionacquired from the segmentation is then overlaid on each of video framesin the video where the subject person walks from left to right. In thisway, while displaying that the subject person is walking toward theright end, the subject person frozen at the left end is displayedsimultaneously, thereby implementing the frozen doppelgänger specialeffect.

In embodiments of the present disclosure, the subject region in whichthe target object is located may be an image region within the edge ofthe target object. For example, the target object is cut out of a videoframe along the edge by image segmentation technique, and the regionenclosed by the edge of the target object is taken as the subjectregion.

In an embodiment, the subject region in which the target object islocated may also be a graphic region of a fixed shape including thetarget object, such as a rectangular region or a circular region, etc.If the background picture of the video is a static environment, in whichcase the region of each of a plurality of video frames other than thetarget object is a fixed picture, then, the subject region in which thetarget object is located may be isolated by a simple rule graph.

In another embodiment, during recording of the video, after the specialeffect frame has been generated, the special effect frame may be cachedin predetermined cache space. After the video recording completes, aprompt of whether to generate a special effect video is displayed. It isdetermined whether to generate a special effect video according to theoperation instruction of the user. If the user determines to generate aspecial effect video, the cached special effect frame replaces anoriginal video frame to generate and save as a special effect video. Ifthe user determines not to generate any special effect video, the cachedspecial effect frame may be deleted.

It should be noted that after a special effect video has been generated,the selection of whether to save the original video may be provided asneeded by the user. If the user chooses not to save the original video,the original video frame corresponding to the generated special effectframe may be deleted and replaced with the special effect frame. Thevideo frame stream composed of video frames after replacement with thespecial effect frame is then used to generate the special effect video.If the user chooses to retain the original video, both the specialeffect video after replacement with the special effect frame, and theoriginal video composed of original video frames, may be generated,respectively. This facilitates subsequent comparison, viewing, andfurther adjustment by the user.

According to one or more embodiments of the present disclosure, a targetobject in different video frames in a video is automatically identifiedand isolated via image segmentation technology of the terminal per se,and overlaid on another video frame, thereby generating a video specialeffect of doppelgängers or copies of the target object easily andquickly, without having to use any complex post-production tool orproduction technique. In this way, in playback or preview duringphotographing, a special effect frame may be displayed directly in apicture, displaying a special effect, thereby facilitating videoproduction at a terminal, while improving a viewing experience of auser.

In some embodiments, the subject region of the video frame in the videoin which the target object is located and the background region otherthan the subject region may be determined as follows.

The target object in the video frame in the video may be identified.

The subject region and the background region may be determined accordingto the target object.

In embodiments of the present disclosure, a target object in a videoframe is identified using an image identification technique. Forexample, different objects in an image are identified using an edgeidentification technique. An object in an image having a characteristicof a person is identified using portrait identification, etc. Of course,a target object to be identified may also be determined according to theoperation of the user. For example, the edges of different objects in animage are determined using an edge identification technique, and thenthe subject region of the target object is determined through the imageregion clicked on by the user. As another example, an edge graph plottedby a user by an operation such as touch, is received, and a regionenclosed by the edge graph is determined as a subject region of thetarget object.

After determining the subject region in which the target object islocated, a region beyond the edge of the subject region may bedetermined as the background region. In this way, the target object inan image may be identified in a simple manner, and a video image may bedivided into the subject region and the background region according tothe target object.

In some embodiments, the first video frame includes a freeze-frame, andthe second video frame includes a video frame after the freeze-frame. Asshown in FIG. 2 , in S102, the subject region in the at least one of thefirst video frame having the target object may be overlaid on the atleast one of the second video frame having the target object, generatingthe special effect frame including the at least two subject regions ineach of which the target object is located, as follows.

In S201, at least one of the freeze-frame may be selected from the videoframe of the video.

In S202, the subject region of the freeze-frame may be overlaid on thesecond video frame, generating the special effect frame.

In embodiments of the present disclosure, video frames at differentlocations in the video may be selected as freeze-frames. The subjectregion in a freeze-frame may serve to be overlaid on another video framethat comes after the freeze-frame. In this way, the target object in thefreeze-frame in the video may form a “frozen” effect, that is, thetarget object in the freeze-frame is always displayed in each videoframe after the freeze-frame.

It will be appreciated that if there are a plurality of freeze-frames ina video, as the video is played, after the freeze-frames have appearedone by one, frozen doppelgängers (or clones, or copies) will appear oneby one in the video picture. For example, the target object is a runningperson. While the person is running, a freeze-frame appears once in awhile, then a plurality of “doppelgängers”, or duplicates, of the personfixed at different locations will appear one after another in the videopicture, thereby implementing a “frozen doppelgänger” specific effect.

The process of identifying the target object, selecting a freeze-frame,and generating a special effect frame may be performed in the process ofprocessing the video file after the video recording completes, or may beperformed at any time in the process of acquiring the video framesduring video recording, and the special effect frame with the overlaidsubject region may be displayed directly on a preview interface.

In addition, in the process of recording the video, a photographingparameter may be fixed, reducing special effect frame distortion causedby automatic adjustment of the photographing parameter due to a changein light. A photographing parameter includes, but is not limited to,parameters such as International Organization for Standardization (ISO)photosensibility, exposure time, a focus distance, white balance, etc.

In this way, by selecting freeze-frames at different intervals, it ispossible to produce diversified doppelgänger effects, thereby adding funto the entire video. Meanwhile, the production process is simple andeasy to operate, and direct production during video recording may addfun to video photographing and improves experience of human-terminalinteraction, and complicated post-production is not required.

In some embodiments, the at least one of the freeze-frame may beselected from the video frame of the video as follows.

A predetermined operation instruction may be detected during playback ofthe video.

A video frame displayed when the predetermined operation instruction isdetected may be determined as the freeze-frame.

There may be multiple modes for selecting a freeze-frame. A freeze-framemay be selected in different modes according to different video featuresor user preferences. In the embodiment, a freeze-frame may be selectedaccording to a user operation received.

In embodiments of the present disclosure, the process of video playbackmay be a process of playback of an existing video file, or may bepreview playback during recording. In the case of a process of playbackof an existing video file, playback may also be performed at differentplayback speeds as needed by the user. For example, in order tofacilitate clear display of the video to allow a user to perform aselection operation, slow playback may be performed, such as at 0.5times the speed, at 0.1 times the speed, or even in a frame-by-frameswitch mode. In the case of preview playback during recording, the usermay select a freeze-frame flexibly according to the interaction betweenthe user and the photographed object or the actual action of thephotographed object in the photographing process.

It will be appreciated that the terminal may determine a freeze-frameaccording to a predetermined operation instruction, and when it isdetected that the operation instruction of the user is the predeterminedoperation instruction, the terminal may determine that the currentlydisplayed video frame is to be used as a freeze-frame. Here, thepredetermined operation instruction may be a touch instruction of apredetermined gesture, such as an instruction of a touch operation suchas clicking, double-clicking, sliding upward, sliding downward, orirregular sliding. The predetermined operation instruction may also be acase operation instruction, such as pressing a volume key and an on/offkey at the same time, etc. The predetermined operation instruction mayalso be a voice input instruction, etc.

In this way, regardless of whether the terminal is recording a video orplaying an existing video file, a user may select a freeze-frame througha simple operation and complete the production of a “frozendoppelgänger” special effect, with a simple convenient operation.

In some embodiments, the at least one of the freeze-frame may beselected from the video frame of the video as follows.

Video frames at intervals of a predetermined duration in the video maybe selected as the freeze-frame.

In the embodiment, the terminal may automatically select a freeze-frameaccording to an interval of a predetermined duration, such as aninterval of a predetermined duration of 10 seconds. Then, the terminalmay use a video frame being played as a freeze-frame every 10 secondsduring video recording or video file playback.

Of course, the mode may also be performed other than during playback orpreview. Since video frames of the video are played at a fixedfrequency, it is possible to determine the number of video frames inbetween video frames at intervals of a predetermined duration withoutplayback. That is, each freeze-frame in a video file may be determineddirectly according to the interval of the number of video frames. Forexample, if the video is played at a frequency of 30 frames per second,and the predetermined duration is 10 seconds, then frames spaced atevery 300 frames in the video may be determined as freeze-frames.

In this way, freeze-frame selection may be completed automatically bythe terminal by simple setting, without having to watching the videorepeatedly to perform selection, and without requiring any accurate useroperation.

In some embodiments, the at least one of the freeze-frame may beselected from the video frame of the video as follows.

A stance of the target object in the video frame of the video may bedetermined.

When stances of the target object in a consecutive number N of the videoframe are identical, one of the consecutive number N of the video framemay be selected as the freeze-frame. The N may be a positive integergreater than or equal to 2.

In embodiments of the present disclosure, automatic selection may alsobe performed through the content of the video. A selected freeze-frameis determined by detecting the stance of the target object in a videoframe. For different types of videos, personalized automatic selectionmay be implemented.

In photographing a frozen doppelgänger video special effect, thephotographed object and the user themselves may pose and photograph anaction as the frozen doppelgänger. That is, while moving, thephotographed object may pose in a specific stance when it is desired toproduce a frozen doppelgänger effect, and pause for a period of timebefore continuing to move.

In this way, the terminal may select a freeze-frame according to whetherthe target object remains the same stance in the photographed picture inN consecutive video frames.

It will be appreciated that since the photographed object may not beable to maintain the identical stance in the N video frames in which themovement is paused, the “same stance” here may be understood as notgenerating a movement beyond a predetermined range, and is not limitedto a slight shaking of the target object or a small movement of a bodypart such as a blink, a finger wobble, etc.

In this way, a freeze-frame is selected by identifying the stance of thetarget object, so that it is not necessary for the user to make a manualselection, and it is possible to implement automatic personalizedselection of video content, improving the flexibility and the degree ofautomation in the video production process, providing betterhuman-terminal interaction experience.

In some embodiments, the at least one of the freeze-frame may beselected from the video frame of the video as follows.

A location of the target object in a current video frame may bedetermined.

When a distance between the location of the target object in the currentvideo frame and a location of the target object in a last freeze-frameis a predetermined distance, the current video frame may be determinedas the freeze-frame.

Similar to the previous embodiment, in the embodiment, selection of afreeze-frame is also performed according to a video picture, and videoframes in which the target object is at locations spaced apart by afixed distance are selected as freeze-frames according to the locationof the target object in each video frame. For example, whenever thetarget object is at a predetermined distance from its location in thelast freeze-frame, the current video frame is selected as afreeze-frame, so that a plurality of freeze-frames may be distributedevenly in a video picture.

It should be noted that in the embodiments of the present disclosure, inan actual application, one of the several modes for selecting afreeze-frame may always be used, or the mode may be switched at any timeaccording to a user setting. Further, a selection from the several modesis possible in producing the same video. In this way, more diversifiedoperations may be implemented, and a combination of automatic and manualoperations may be implemented, facilitating the production of moreabundant special effects.

In an embodiment, prompt information is displayed before video recordingstarts. The prompt information serves to prompt the user whether toenable the function of automatic freeze-frame selection. If the receiveduser instruction determines to enable the function of automaticfreeze-frame selection, automatic selection is performed in accordancewith at least one of the above modes during the recording process. Atleast one of the above modes includes automatically selecting afreeze-frame according to a location or a stance of the target object,or an interval of a predetermined duration in the video.

In another embodiment, before video recording starts, it may bedetermined, according to a user instruction, whether to enable thefunction of producing a special effect frame during recording. If thefunction of producing a special effect frame is activated, the promptinformation is displayed.

In this way, the user may select whether to activate automatic selectionof a freeze-frame and the mode for the automatic selection according tothe actual requirement, the type and content of the video to be shot. Ofcourse, the user may also determine whether to select a freeze-frame bymanual selection before video recording starts. A manual selection modemay also be used as a default mode, and by default a freeze-frame isdetermined in a manual selection mode as long as the function of specialeffect frame production during recording is activated.

In some embodiments, the method further includes a step as follows.

An alignment parameter of the subject region of the first video framemay be determined according to a location of the target object in thefirst video frame. The alignment parameter may be used to determine atarget location of the subject region of the first video frame in thespecial effect frame.

The subject region in at least one video frame may be overlaid on atleast one video frame other than the video frame where the target objectis located, generating the special effect frame including at least twosubject regions where the target object is located, as follows.

The subject region may be overlaid, according to the alignmentparameter, at the target location on at least one video frame other thanthe video frame in which the target object is located, generating thespecial effect frame including two subject regions in each of which thetarget object is located.

In embodiments of the present disclosure, after determining afreeze-frame, the subject region of the freeze-frame in which the targetobject is located may be overlaid on each video frame after thefreeze-frame, thereby implementing the “frozen” effect. A backgroundregion does not need to be covered. Thus, other than the region in whichthe “frozen doppelgänger” is located, other regions still change withplayback of the video, thereby producing an unreal feeling visuallybeyond a physical law, bringing about visual impact of a special effect.

It may be appreciated that in the process of overlaying a subject regionand generating the special effect frame, it is necessary to overlay thesubject region at a designated location of the special effect frame inorder to implement the effect of the frozen subject regions in thecontinuous video. Therefore, an alignment parameter of the subjectregion is determined here according to the location of the target objectin the original video frame, that is, the freeze-frame. In thesubsequent process of generating the special effect frame, the locationwhere the subject region is overlaid may be determined according to thealignment parameter of the subject region, so that the location of the“frozen doppelgänger” on the special effect frame is consistent with thelocation of the target object in the freeze-frame.

In some embodiments, the alignment parameter of the subject region ofthe first video frame may be determined according to the location of thetarget object in the first video frame as follows.

A video frame may be selected as a reference frame from the video frameof the video.

The alignment parameter may be determined according to a location offsetof the target object in the first video frame with respect to the targetobject in the reference frame.

The alignment parameter may be determined according to the referenceframe of the video. For example, the first frame in the video frame, orthe first freeze-frame, etc., is selected as the reference frame, andthen a corresponding alignment parameter is determined based on thelocation offset of the target object in a subsequent freeze-frame andthe reference frame with respect to the reference frame. Thus, thealignment parameter of each freeze-frame is determined according to thelocation with respect to the reference frame of the video, therebymaintaining continuity in locations of the target object in differentvideo frames.

That is, according to embodiments of the present disclosure, therelative location relationship is used instead of the absolute locationof the entire video picture, so that the location deviation caused bythe picture jitter and the like may be reduced, thereby making thepicture of the special effect frame more smooth. In this way, even ifthe user perform photographing by directly holding the terminal,existence of some jitters will not affect the effect of the picture ofthe special effect frame, and the terminal does not need to be fixedusing a fixing tool such as a tripod.

In some embodiments, the second video frame includes a video framebefore the freeze-frame. As shown in FIG. 3 , in S102, the subjectregion in the at least one of the first video frame having the targetobject may be overlaid on the at least one of the second video framehaving the target object, generating the special effect frame includingthe at least two subject regions in each of which the target object islocated as follows.

In S301, the subject region in the at least one of the first video framehaving the target object may be overlaid on at least one of a secondvideo frame before the first video frame, generating the special effectframe.

In the embodiment, it is possible to display a specific effect ofincreasing “frozen doppelgängers” during video recording, or duringplayback of a video file that has been recorded.

In embodiments of the present disclosure, a post special effectadjustment may also be performed on a video file that has been recorded,to implement the specific effect of decreasing “frozen doppelgängers”.

Since a plurality of freeze-frames have been determined using the methodin the embodiments during the initial production or recording of thevideo, the subject region of a freeze-frame overlaid may be adjusted invideo frames at different locations during a subsequent playback. Forexample, the subject region of a freeze-frame is overlaid on a videoframe before the freeze-frame, and not on a video frame after thefreeze-frame.

In this way, a plurality of fixed target objects are displayed at thebeginning of the video picture, and then, the number of “frozendoppelgängers” decrease with movement of the target object. That is,each time the target object moves to the location of a frozendoppelgänger, the frozen doppelgänger disappears and continues to movewith the target object.

In this way, different special effects may be produced using theterminal, so that the video is more fun, and more abundant video worksmay be produced.

Embodiments of the present disclosure also provide an example asfollows.

A frozen doppelgänger special effect is produced by editing a video,such that a plurality of frozen images of the same person appear in thevideo picture at the same time, and freeze-frames may be increased ordecreased as the location of the person changes.

In embodiments of the present disclosure, identification of a subjectregion of a target object in a video picture is implemented using anartificial intelligence technology, including video picture targetidentification, image segmentation technology, etc. In addition, thelocation of the subject region, time of overlaying, etc., may becomputed automatically through an alignment technology. In this way, avideo result may be previewed in real time during the photographingprocess, and the video with a special effect picture may be quicklygenerated. A film may be acquired directly using a user terminal such asa mobile phone without using a post-stage video editing tool by aprofessional, and the production cost is low, the production time isshort, and the application range is wide.

In addition, in embodiments of the present disclosure, the alignmentparameter of the subject region is determined using the location withrespect to the reference frame, reducing the location deviation causedby the jitter in the photographing process, therefore implementinghand-held photographing without having to use a fixing tool such as atripod.

In embodiments of the present disclosure, a flow of recording a videowith a frozen doppelgänger special effect using a terminal is as shownin FIG. 4 , and includes steps as follows.

In S401, a preview screen may be displayed on a preview interface aftera camera function is turned on.

In S402, a recording state may be entered according to an instructionreceived, to start recording a video picture.

In S403, a recorded video picture and a generated special effect framemay be displayed on the preview interface, implementing effect preview.

In S404, switch to a frozen doppelgänger mode may be performed accordingto a switch instruction received to preview and display a special effectframe in the frozen doppelgänger mode. An original video frame may bepreviewed and displayed in a non-frozen doppelgänger mode.

In S405, the video frame and the special effect frame are saved,acquiring a video file.

The process of producing a special effect frame may be implemented by aflowchart as shown in FIG. 5 . If a video frame being processed is thefirst frame, a photographing parameter of the first frame may be locked.The photographing parameter includes, but is not limited to, parameterssuch as ISO, exposure time, a focus distance, white balance, etc.Meanwhile, a freeze frame selecting module is initialized, providing aselection method, storage space, etc., for selecting a freeze-frame. Inaddition, the first frame may be determined as a reference frame, and analignment module for subsequently determining the location of the targetobject may be generated according to the reference frame.

If the video being processed is any frame after the first frame, such asthe i-th frame, the subject region mask i in which the target object ofthe frame is located is acquired using an image segmentation technique.The alignment parameter Wi of the target object in the frame isdetermined using the alignment module.

The sequence number i of the current frame and the subject region mask iare added to the freeze-frame selecting module, and the freeze-frameselecting module determines whether to add the current frame or aprevious frame as a new freeze-frame according to a preset selectionrule. The selection rule may include the following.

First, a selection is made according to time. For example, a currentframe is automatically added as a freeze-frame every second.

Secondly, selection is made according to a user operation received. Forexample, when a touch screen receives a user click operation, a videoframe at the time of the click is selected as a freeze-frame.

Thirdly, a freeze-frame is selected automatically according to thelocation of the target object in a video frame. For example, each timethe target object is at a predetermined distance from the location inthe last freeze-frame, the current video frame is selected as afreeze-frame, so that a plurality of freeze-frames may be distributeduniformly in the video picture.

Fourthly, a freeze-frame is selected automatically according to thelocation and time of the target object in the video. For example, whenthe target object stays at one location in N consecutive video frames,one of the N video frames is selected as a freeze-frame, so thatautomatic freeze may be implemented as willed by the person beingphotographed.

After selecting a freeze-frame, the subject region mask of the targetobject may be plotted in a video frame after each freeze-frame using thealignment parameter of the target object in the each freeze-frame,thereby generating a special effect frame with a plurality of frozendoppelgängers.

In embodiments of the present disclosure, the video may be processedafter recording completes, generating a special effect, includingdifferent effects of increasing frozen doppelgängers and decreasingfrozen doppelgängers. The effect of decreasing frozen doppelgängers isas shown in FIG. 6A, where the subject region in a freeze-frame in whichthe target object is located is overlaid in each video frame before thefreeze-frame, implementing the effect of decreasing frozen doppelgängersin the process of playback. The effect of increasing frozendoppelgängers is as shown in FIG. 6B, where the subject region in afreeze-frame in which the target object is located is overlaid in eachvideo frame after the frozen freeze-frame, implementing the effect ofgradually increasing frozen doppelgängers in the process of playback.

With the one or more embodiments of the present disclosure, a complexvideo special effect editing algorithm is hidden in a product functionof a terminal through an artificial intelligence technology. The usermay preview a synthesized special effect in real time during aphotographing process, and adjust a photographing process at any timeaccording to feedback of the preview. After photographing completes, avideo file with a special effect may be acquired, thereby effectivelyimproving user experience.

FIG. 7 is a block diagram of a structure of a device for processing avideo according to an illustrative embodiment. As shown in FIG. 7 , thedevice 700 is applied to a terminal, and includes modules as follows.

A first determining module 701 is configured to determine a subjectregion of a video frame in a video, in which a target object is located,and a background region. The background region is a region of the videoframe other than the subject region.

A generating module 702 is configured to overlay the subject region inat least one of a first video frame having the target object on at leastone of a second video frame having the target object, generating aspecial effect frame including at least two subject regions in each ofwhich the target object is located.

In some embodiments, the first determining module includes:

an identifying sub-module configured to identify the target object inthe video frame in the video; and

a first determining sub-module configured to determine the subjectregion and the background region according to the target object.

In some embodiments, the first video frame includes a freeze-frame. Thesecond video frame may include a video frame after the freeze-frame.

The generating module may include:

a first selecting sub-module configured to select at least one of thefreeze-frame from the video frame of the video; and

a generating sub-module configured to overlay the subject region of thefreeze-frame on the second video frame, generating the special effectframe.

In some embodiments, the first selecting sub-module includes:

a detecting sub-module configured to detect a predetermined operationinstruction during playback of the video; and

a second determining sub-module configured to determine, as thefreeze-frame, a video frame displayed when the predetermined operationinstruction is detected.

In some embodiments, the first selecting sub-module is specificallyconfigured to:

select, as the freeze-frame, video frames at intervals of apredetermined duration in the video.

In some embodiments, the first selecting sub-module includes:

a third determining sub-module configured to determine a stance of thetarget object in the video frame of the video; and

a second selecting sub-module configured to, in response to stances ofthe target object in a consecutive number N of the video frame beingidentical, select one of the consecutive number N of the video frame asthe freeze-frame. The N may be a positive integer greater than or equalto 2.

In some embodiments, the first selecting sub-module includes:

a fourth determining sub-module configured to determine a location ofthe target object in a current video frame; and

a fifth determining sub-module configured to, in response to a distancebetween the location of the target object in the current video frame anda location of the target object in a last freeze-frame being apredetermined distance, determine the current video frame as thefreeze-frame.

In some embodiments, the device further includes:

a second determining module configured to determine an alignmentparameter of the subject region of the first video frame according to alocation of the target object in the first video frame. The alignmentparameter may be used to determine a target location of the subjectregion of the first video frame in the special effect frame.

The generating module may be specifically configured to:

according to the alignment parameter, overlay the subject region of thefirst video frame at the target location on at least one video frameother than the first video frame in which the target object is located,generating the special effect frame including two subject regions ineach of which the target object is located.

In some embodiments, the second determining module includes:

a third selecting sub-module configured to select, from the video frameof the video, a video frame as a reference frame; and

a sixth determining sub-module configured to determine the alignmentparameter according to a location offset of the target object in thefirst video frame with respect to the target object in the referenceframe.

In some embodiments, the second video frame includes a video framebefore the freeze-frame. The generating module is specificallyconfigured to:

overlay the subject region in the at least one of the first video framehaving the target object on at least one of a second video frame beforethe first video frame, generating the special effect frame.

A module of the device according to an aforementioned embodiment hereinmay perform an operation in a mode elaborated in an aforementionedembodiment of the method herein, which will not be repeated here.

FIG. 8 is a block diagram of a terminal 800 according to an illustrativeembodiment. For example, the terminal 800 may be a terminal such as amobile phone, a computer, a digital broadcasting terminal, messagingequipment, a game console, tablet equipment, medical equipment, fitnessequipment, a Personal Digital Assistant (PDA), etc.

Referring to FIG. 8 , the terminal 800 may include one or morecomponents as follows: a processing component 801, a memory 802, a powercomponent 803, a multimedia component 804, an audio component 805, anInput/Output (I/O) interface 806, a sensor component 807, and acommunication component 808.

The processing component 801 generally controls an overall operation ofthe display equipment, such as operations associated with display, atelephone call, data communication, a camera operation, a recordingoperation, etc. The processing component 801 may include one or moreprocessors 810 to execute instructions so as to complete all or somesteps of the method. In addition, the processing component 801 mayinclude one or more modules to facilitate interaction between theprocessing component 801 and other components. For example, theprocessing component 801 may include a multimedia module to facilitateinteraction between the multimedia component 804 and the processingcomponent 801.

The memory 802 is configured to store various types of data to supportoperation on the terminal 800. Examples of these data includeinstructions of any application or method configured to operate on theterminal 800, contact data, phonebook data, messages, pictures, videos,and/or the like. The memory 802 may be realized by any type of volatileor non-volatile storage equipment or combination thereof, such as StaticRandom Access Memory (SRAM), Electrically Erasable ProgrammableRead-Only Memory (EEPROM), Erasable Programmable Read-Only Memory(EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM),magnetic memory, flash memory, magnetic disk, or compact disk.

The power component 803 supplies electric power to various components ofthe terminal 800. The power component 803 may include a power managementsystem, one or more power supplies, and other components related togenerating, managing and distributing electric power for the terminal800.

The multimedia component 804 includes a screen providing an outputinterface between the terminal 800 and a user. The screen may include aLiquid Crystal Display (LCD) and a Touch Panel (TP). If the screenincludes a TP, the screen may be realized as a touch screen to receivean input signal from a user. The TP includes one or more touch sensorsfor sensing touch, slide and gestures on the TP. The touch sensors notonly may sense the boundary of a touch or slide move, but also detectthe duration and pressure related to the touch or slide move. In someembodiments, the multimedia component 804 includes a front camera and/ora rear camera. When the terminal 800 is in an operation mode such as ashooting mode or a video mode, the front camera and/or the rear cameramay receive external multimedia data. Each of the front camera and/orthe rear camera may be a fixed optical lens system or may have a focallength and be capable of optical zooming.

The audio component 805 is configured to output and/or input an audiosignal. For example, the audio component 805 includes a microphone(MIC). When the terminal 800 is in an operation mode such as a callmode, a recording mode, and a voice recognition mode, the MIC isconfigured to receive an external audio signal. The received audiosignal may be further stored in the memory 802 or may be sent via thecommunication component 808. In some embodiments, the audio component805 further includes a loudspeaker configured to output the audiosignal.

The I/O interface 806 provides an interface between the processingcomponent 801 and a peripheral interface module. The peripheralinterface module may be a keypad, a click wheel, a button or the like.These buttons may include but are not limited to: a homepage button, avolume button, a start button, and a lock button.

The sensor component 807 includes one or more sensors for assessingvarious states of the terminal 800. For example, the sensor component807 may detect an on/off state of the terminal 800 and relativepositioning of components such as the display and the keypad of theterminal 800. The sensor component 807 may further detect a change inthe location of the terminal 800 or of a component of the terminal 800,whether there is contact between the terminal 800 and a user, theorientation or acceleration/deceleration of the terminal 800, and achange in the temperature of the terminal 800. The sensor component 807may include a proximity sensor configured to detect existence of anearby object without physical contact. The sensor component 807 mayfurther include an optical sensor such as a ComplementaryMetal-Oxide-Semiconductor (CMOS) or Charge-Coupled-Device (CCD) imagesensor used in an imaging application. In some embodiments, the sensorcomponent 807 may further include an acceleration sensor, a gyroscopesensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

The communication component 808 is configured to facilitate wired orwireless/radio communication between the terminal 800 and otherequipment. The terminal 800 may access a radio network based on acommunication standard such as WiFi, 2G, 3G, . . . , or a combinationthereof. In an illustrative embodiment, the communication component 808broadcasts related information or receives a broadcast signal from anexternal broadcast management system via a broadcast channel. In anillustrative embodiment, the communication component 808 furtherincludes a Near Field Communication (NFC) module for short-rangecommunication. For example, the NFC module may be realized based onRadio Frequency Identification (RFID), Infrared Data Association (IrDA),Ultra-WideBand (UWB) technology, BlueTooth (BT) technology, and othertechnologies.

In an illustrative embodiment, the terminal 800 may be realized by oneor more of Application Specific Integrated Circuits (ASIC), DigitalSignal Processors (DSP), Digital Signal Processing Device (DSPD),Programmable Logic Devices (PLD), Field Programmable Gate Arrays (FPGA),controllers, microcontrollers, microprocessors or other electroniccomponents, to implement the method.

In an illustrative embodiment, a transitory or non-transitorycomputer-readable storage medium including instructions, such as thememory 802 including instructions, is further provided. The instructionsmay be executed by the processor 810 of the terminal 800 to implementthe method. For example, the computer-readable storage medium may be aRead-Only Memory (ROM), a Random Access Memory (RAM), a Compact DiscRead-Only Memory (CD-ROM), a magnetic tape, a floppy disk, optical datastorage equipment, etc.

Embodiments of the present disclosure further provide a transitory ornon-transitory computer-readable storage medium. When instructions inthe storage medium are executed by a processor of a mobile terminal, themobile terminal is allowed to perform the method provided in any one ofthe embodiments.

Further note that herein by “multiple”, it may mean two or more. Otherquantifiers may have similar meanings. A term “and/or” may describe anassociation between associated objects, indicating three possiblerelationships. For example, by A and/or B, it may mean that there may bethree cases, namely, existence of but A, existence of both A and B, orexistence of but B. A slash mark “/” may generally denote an “or”relationship between two associated objects that come respectivelybefore and after the slash mark. Singulars “a/an”, “said” and “the” areintended to include the plural form, unless expressly illustratedotherwise by context.

Further note that although in drawings herein operations are describedin a specific or der, it should not be construed as that the operationshave to be performed in the specific or der or sequence, or that anyoperation shown has to be performed in or der to acquire an expectedresult. Under a specific circumstance, multitask and parallel processingmay be advantageous.

Other implementations of the present disclosure will be apparent to aperson having ordinary skill in the art that has considered thespecification and practiced the present disclosure. The presentdisclosure is intended to cover any variation, use, or adaptation of thepresent disclosure following the general principles of the presentdisclosure and including such departures from the present disclosure ascome within common knowledge or customary practice in the art. Thespecification and the embodiments are intended to be illustrative only,with a true scope and spirit of the present disclosure being indicatedby the appended claims.

It should be understood that the present disclosure is not limited tothe exact construction that has been described above and illustrated inthe accompanying drawings, and that various modifications and changescan be made to the present disclosure without departing from the scopeof the present disclosure. It is intended that the scope of the presentdisclosure is limited only by the appended claims.

According to a first aspect of embodiments of the present disclosure,there is provided a method for processing a video. The method is appliedto a terminal, and includes:

determining a subject region of a video frame in a video, in which atarget object is located, and a background region, the background regionbeing a region of the video frame other than the subject region; and

overlaying the subject region in at least one of a first video framehaving the target object on at least one of a second video frame havingthe target object, generating a special effect frame including at leasttwo subject regions in each of which the target object is located.

In some embodiments, determining the subject region of the video framein the video in which the target object is located and the backgroundregion other than the subject region includes:

identifying the target object in the video frame in the video; and

determining the subject region and the background region according tothe target object.

In some embodiments, the first video frame includes a freeze-frame. Thesecond video frame may include a video frame after the freeze-frame.

Overlaying the subject region in the at least one of the first videoframe having the target object on the at least one of the second videoframe having the target object, generating the special effect frameincluding the at least two subject regions in each of which the targetobject is located, may include:

selecting at least one of the freeze-frame from the video frame of thevideo; and

overlaying the subject region of the freeze-frame on the second videoframe, generating the special effect frame.

In some embodiments, selecting the at least one of the freeze-frame fromthe video frame of the video includes:

detecting a predetermined operation instruction during playback of thevideo; and

determining, as the freeze-frame, a video frame displayed when thepredetermined operation instruction is detected.

In some embodiments, selecting the at least one of the freeze-frame fromthe video frame of the video includes:

selecting, as the freeze-frame, video frames at intervals of apredetermined duration in the video.

In some embodiments, selecting the at least one of the freeze-frame fromthe video frame of the video includes:

determining a stance of the target object in the video frame of thevideo; and

in response to stances of the target object in a consecutive number N ofthe video frame being identical, selecting one of the consecutive numberN of the video frame as the freeze-frame. The N may be a positiveinteger greater than or equal to 2.

In some embodiments, selecting the at least one of the freeze-frame fromthe video frame of the video includes:

determining a location of the target object in a current video frame;and

in response to a distance between the location of the target object inthe current video frame and a location of the target object in a lastfreeze-frame being a predetermined distance, determining the currentvideo frame as the freeze-frame.

In some embodiments, the method further includes:

determining an alignment parameter of the subject region of the firstvideo frame according to a location of the target object in the firstvideo frame. The alignment parameter may be used to determine a targetlocation of the subject region of the first video frame in the specialeffect frame.

The subject region in at least one video frame may be overlaid on atleast one video frame other than the video frame where the target objectis located, generating the special effect frame including at least twosubject regions where the target object is located, as follows.

The subject region may be overlaid, according to the alignmentparameter, at the target location on at least one video frame other thanthe video frame in which the target object is located, generating thespecial effect frame including two subject regions in each of which thetarget object is located.

In some embodiments, determining the alignment parameter of the subjectregion of the first video frame according to the location of the targetobject in the first video frame includes:

selecting, from the video frame of the video, a video frame as areference frame; and

determining the alignment parameter according to a location offset ofthe target object in the first video frame with respect to the targetobject in the reference frame.

In some embodiments, the second video frame includes a video framebefore the freeze-frame.

Overlaying the subject region in the at least one of the first videoframe having the target object on the at least one of the second videoframe having the target object, generating the special effect frameincluding the at least two subject regions in each of which the targetobject is located, may include:

overlaying the subject region in the at least one of the first videoframe having the target object on at least one of a second video framebefore the first video frame, generating the special effect frame.

According to a second aspect of embodiments of the present disclosure, adevice for processing a video is provided. The device is applied to aterminal, and includes:

a first determining module configured to determine a subject region of avideo frame in a video, in which a target object is located, and abackground region, the background region being a region of the videoframe other than the subject region; and

a generating module configured to overlay the subject region in at leastone of a first video frame having the target object on at least one of asecond video frame having the target object, generating a special effectframe including at least two subject regions in each of which the targetobject is located.

In some embodiments, the first determining module includes:

an identifying sub-module configured to identify the target object inthe video frame in the video; and

a first determining sub-module configured to determine the subjectregion and the background region according to the target object.

In some embodiments, the first video frame includes a freeze-frame. Thesecond video frame may include a video frame after the freeze-frame.

The generating module may include:

a first selecting sub-module configured to select at least one of thefreeze-frame from the video frame of the video; and

a generating sub-module configured to overlay the subject region of thefreeze-frame on the second video frame, generating the special effectframe.

In some embodiments, the first selecting sub-module includes:

a detecting sub-module configured to detect a predetermined operationinstruction during playback of the video; and

a second determining sub-module configured to determine, as thefreeze-frame, a video frame displayed when the predetermined operationinstruction is detected.

In some embodiments, the first selecting sub-module is specificallyconfigured to:

select, as the freeze-frame, video frames at intervals of apredetermined duration in the video.

In some embodiments, the first selecting sub-module includes:

a third determining sub-module configured to determine a stance of thetarget object in the video frame of the video; and

a second selecting sub-module configured to, in response to stances ofthe target object in a consecutive number N of the video frame beingidentical, select one of the consecutive number N of the video frame asthe freeze-frame. The N may be a positive integer greater than or equalto 2.

In some embodiments, the first selecting sub-module includes:

a fourth determining sub-module configured to determine a location ofthe target object in a current video frame; and

a fifth determining sub-module configured to, in response to a distancebetween the location of the target object in the current video frame anda location of the target object in a last freeze-frame being apredetermined distance, determine the current video frame as thefreeze-frame.

In some embodiments, the device further includes:

a second determining module configured to determine an alignmentparameter of the subject region of the first video frame according to alocation of the target object in the first video frame. The alignmentparameter may be used to determine a target location of the subjectregion of the first video frame in the special effect frame.

The generating module may be specifically configured to:

according to the alignment parameter, overlay the subject region of thefirst video frame at the target location on at least one video frameother than the first video frame in which the target object is located,generating the special effect frame including two subject regions ineach of which the target object is located.

In some embodiments, the second determining module includes:

a third selecting sub-module configured to select, from the video frameof the video, a video frame as a reference frame; and

a sixth determining sub-module configured to determine the alignmentparameter according to a location offset of the target object in thefirst video frame with respect to the target object in the referenceframe.

In some embodiments, the second video frame includes a video framebefore the freeze-frame. The generating module may be specificallyconfigured to:

overlay the subject region in the at least one of the first video framehaving the target object on at least one of a second video frame beforethe first video frame, generating the special effect frame.

According to a third aspect of embodiments of the present disclosure, acommunication device of a terminal is provided. The device includes atleast a processor and a memory for storing executable instructionsexecutable on the processor.

The processor is configured to execute the executable instructions toperform a step of any method for processing a video herein.

According to a fourth aspect of embodiments of the present disclosure, anon-transitory computer-readable storage medium is provided. Thecomputer-readable storage medium has stored therein computer-executableinstructions which, when executed by a processor, implement a step ofany method for processing a video herein.

What is claimed is:
 1. A method for processing a video, the methodapplied to a terminal, and comprising: determining a subject region anda background region of a video frame in a video, wherein a target objectis located in the subject region, and wherein the background region is aregion of the video frame other than the subject region; and overlayingthe subject region in at least one of a first video frame having thetarget object on at least one of a second video frame having the targetobject, and generating a special effect frame that comprises at leasttwo subject regions in each of which the target object is located,wherein overlaying the subject region in the at least one of the firstvideo frame having the target object on the at least one of the secondvideo frame having the target object, and generating the special effectframe that comprises the at least two subject regions in each of whichthe target object is located, comprises: determining an alignmentparameter of the subject region of the first video frame according to alocation of the target object in the first video frame, wherein thealignment parameter is used to determine a target location of thesubject region of the first video frame in the special effect frame, andoverlaying, according to the alignment parameter, the subject region ofthe first video frame at the target location on at least one video frameother than the first video frame in which the target object is located,and generating the special effect frame that comprises two subjectregions in each of which the target object is located.
 2. The method ofclaim 1, wherein determining the subject region and the backgroundregion of the video frame in the video comprises: identifying the targetobject in the video frame in the video; and determining the subjectregion and the background region according to the target object.
 3. Themethod of claim 1, wherein overlaying the subject region in the at leastone of the first video frame having the target object on the at leastone of the second video frame having the target object, and generatingthe special effect frame further comprises: selecting at least one of afreeze-frame from a video frame of the video, wherein the first videoframe comprises the freeze-frame, and wherein the second video framecomprises the video frame after the freeze-frame; and overlaying thesubject region of the freeze-frame on the second video frame, andgenerating the special effect frame.
 4. The method of claim 3, whereinselecting the at least one of the freeze-frame from the video frame ofthe video comprises: detecting a predetermined operation instructionduring playback of the video; and determining, as the freeze-frame, avideo frame displayed when the predetermined operation instruction isdetected.
 5. The method of claim 3, wherein selecting the at least oneof the freeze-frame from the video frame of the video comprises:selecting, as the freeze-frame, video frames at intervals of apredetermined duration in the video.
 6. The method of claim 3, whereinselecting the at least one of the freeze-frame from the video frame ofthe video comprises: determining a stance of the target object in thevideo frame of the video; and selecting, in response to stances of thetarget object in a consecutive number N of the video frame beingidentical, one of the consecutive number N of the video frame as thefreeze-frame, wherein the N is a positive integer greater than or equalto
 2. 7. The method of claim 3, wherein selecting the at least one ofthe freeze-frame from the video frame of the video comprises:determining a location of the target object in a current video frame;and determining, in response to a distance between the location of thetarget object in the current video frame and a location of the targetobject in a last freeze-frame being a predetermined distance, thecurrent video frame as the freeze-frame.
 8. The method of claim 1,wherein determining the alignment parameter of the subject region of thefirst video frame according to the location of the target object in thefirst video frame comprises: selecting, from the video frame of thevideo, a video frame as a reference frame; and determining the alignmentparameter according to a location offset of the target object in thefirst video frame with respect to the target object in the referenceframe.
 9. The method of claim 1, wherein overlaying the subject regionin the at least one of the first video frame having the target object onthe at least one of the second video frame having the target object, andgenerating the special effect frame further comprises: overlaying thesubject region in the at least one of the first video frame having theoverlaying the subject region in the at least one of the first videoframe having the target object on at least one of a second video framebefore the first video frame, and generating the special effect frame.10. A device, comprising: one or more processors and a non-transitorycomputer-readable storage medium for storing executable instructionsexecutable on the one or more processors, wherein the one or moreprocessors are configured to: determine a subject region of a videoframe in a video and a background region, wherein a target object islocated in the subject region, and wherein the background region is aregion of the video frame other than the subject region; and overlay thesubject region in at least one of a first video frame having the targetobject on at least one of a second video frame having the target object,and generating a special effect frame that comprises at least twosubject regions in each of which the target object is located, whereinthe one or more processors are further configured to: determine analignment parameter of the subject region of the first video frameaccording to a location of the target object in the first video frame,wherein the alignment parameter is used to determine a target locationof the subject region of the first video frame in the special effectframe, and overlay, according to the alignment parameter, the subjectregion of the first video frame at the target location on at least onevideo frame other than the first video frame in which the target objectis located, and generate the special effect frame that comprises twosubject regions in each of which the target object is located.
 11. Thedevice of claim 10, wherein the processor is configured to implement:determining the subject region and the background region of the videoframe in the video, by: identify the target object in the video frame inthe video; and determine the subject region and the background regionaccording to the target object.
 12. The device of claim 10, wherein theone or more processors configured to overlay the subject region in theat least one of the first video frame having the target object on the atleast one of the second video frame having the target object, andgenerate the special effect frame are further configured to: select atleast one of a freeze-frame from a video frame of the video, wherein thefirst video frame comprises the freeze-frame, and wherein the secondvideo frame comprising the video frame after the freeze-frame; andoverlay the subject region of the freeze-frame on the second videoframe, and generate the special effect frame.
 13. The device of claim12, wherein the one or more processors configured to select the at leastone of the freeze-frame from the video frame of the video, are furtherconfigured to: detect a predetermined operation instruction duringplayback of the video; and determine, as the freeze-frame, a video framedisplayed when the predetermined operation instruction is detected. 14.The device of claim 12, wherein the one or more processors configured toselect the at least one of the freeze-frame from the video frame of thevideo are further configured to: select, as the freeze-frame, videoframes at intervals of a predetermined duration in the video.
 15. Thedevice of claim 12, wherein the one or more processors configured toselect the at least one of the freeze-frame from the video frame of thevideo are further configured to: determine a stance of the target objectin the video frame of the video; and select, in response to stances ofthe target object in a consecutive number N of the video frame beingidentical, one of the consecutive number N of the video frame as thefreeze-frame, wherein the N is a positive integer greater than or equalto
 2. 16. The device of claim 12, wherein the one or more processorsconfigured to select the at least one of the freeze-frame from the videoframe of the video are further configured to: determine a location ofthe target object in a current video frame; and determine, in responseto a distance between the location of the target object in the currentvideo frame and a location of the target object in a last freeze-framebeing a predetermined distance, the current video frame as thefreeze-frame.
 17. The device of claim 10, wherein the one or moreprocessors are configured to overlay the subject region in the at leastone of the first video frame having the target object on the at leastone of the second video frame having the target object, and generate thespecial effect frame that comprises the at least two subject regions ineach of which the target object is located are further configured to:overlay the subject region in the at least one of the first video framehaving the overlay the subject region in the at least one of the firstvideo frame having the target object on at least one of a second videoframe before the first video frame, and generate the special effectframe.
 18. A non-transitory computer-readable storage medium havingstored therein computer-executable instructions for execution by acomputing device having one or more processors, wherein thecomputer-executable instructions, when executed by a computing devicehaving one or more processors, cause the computing device to performacts comprising: determining a subject region of a video frame in avideo and a background region, wherein a target object is located in thesubject region, and wherein the background region is a region of thevideo frame other than the subject region; and overlaying the subjectregion in at least one of a first video frame having the target objecton at least one of a second video frame having the target object, andgenerating a special effect frame that comprises at least two subjectregions in each of which the target object is located, whereinoverlaying the subject region in the at least one of the first videoframe having the target object on the at least one of the second videoframe having the target object, and generating the special effect framethat comprises the at least two subject regions in each of which thetarget object is located, comprises: determining an alignment parameterof the subject region of the first video frame according to a locationof the target object in the first video frame, wherein the alignmentparameter is used to determine a target location of the subject regionof the first video frame in the special effect frame, and overlaying,according to the alignment parameter, the subject region of the firstvideo frame at the target location on at least one video frame otherthan the first video frame in which the target object is located, andgenerating the special effect frame that comprises two subject regionsin each of which the target object is located.